$(function(){
	$('.delete-list').on('click',function(){
		popup(this,"{:url('delete')}");
		
	});
	//启用
	$('.startusing').on('click', function() {
		popup(this, "{:url('state')}");

	});
	//禁用
	$('.forbidden').on('click', function() {
		popup(this, "{:url('state')}");

	});
	//选中
	$('.choose').on('click', function() {
		var index = parent.layer.getFrameIndex(window.name);
		parent.$('.user_name').val($(this).closest('tr').find('.username').html());
		parent.$('.user_id').val($(this).closest('tr').data('id'));
		parent.$('.phone').val($(this).closest('tr').find('.phone').html());
		parent.layer.close(index);
	});
})
